package com.sskj.gocoin.mine;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import com.sskj.gocoin.m.HttpConfig;
import com.sskj.gocoin.m.bean.HttpData;
import com.sskj.gocoin.m.http.JsonCallBack;
import com.sskj.gocoin.mine.data.BenefitBean;
import com.sskj.gocoin.p.base.BasePresenter;

public class GradeRulePresenter extends BasePresenter<GradeRuleActivity> {

    /**
     * 我要费率
     */
    public void getBenefit(){
        OkGo.<HttpData<BenefitBean>>post(HttpConfig.BASE_URL + HttpConfig.BENEFIT)
                .execute(new JsonCallBack<HttpData<BenefitBean>>(this) {
                    @Override
                    protected void _onSuccess(Response<HttpData<BenefitBean>> response) {
                        HttpData<BenefitBean> httpData = response.body();
                        if (httpData.getCode() == 200) {
                            mView.onGetBenefit(httpData.getData());
                        }
                    }
                });
    }
}
